
public class BusyThread extends Thread{  
    public synchronized void run(){  
        for(int i=0;i<10000; i++){  
            System.out.println(Thread.currentThread().getName()+"i="+i);  
        }
    }

    public static void main(String args[]){  
        BusyThread b1=new BusyThread();  
        //BusyThread b2=new BusyThread();  
        b1.start();  
        b1.run();  
        //b2.start();  
    }  
}  

